<?php

/*
 * 
 * 
 */

namespace Center\Controller;

use Think\C_Controller;

class BusinessController extends C_Controller {
    
    public function __construct() {
        parent::__construct();
        /*$store_id = (int)$_GET['store_id'];
        if($store_id<1){
            exit;
        }*/
    }

    public function business_add(){
        $this->display('business_add');
    }    

    public function business_submit(){
        $data['mobile'] = trim($_GET['mobile']);
        $data['name'] = $_GET['name'];
        $data['store_name'] = $_GET['store_name'];
        if(strlen($data['name'])<1 || strlen($data['store_name'])<1 || !is_mobile($data['mobile'])){
            echo false; exit;
        }
        $b = new \Home\Logic\Business_addLogic();
        $re = $b->add($data);
        if($re){
            echo true;
        }else{
            echo false;
        }
        exit;
    }

    





}    